{%extends "_layouts/empty.tpl"%}

{%block main_style%}
    <link rel="stylesheet" type="text/css" href="_/public/css/startpage.css" />
{%/block%}

{%block body%}
<div class="clearfix" id="startpage">
    <div id="switcher">
        <a id="go-register" href="{%'account/register'|u%}">注册</a>
    </div>
    <div id="startpage-wrap" style="margin-left: 0px;">
        <h1 id="logo" style="padding-top: 74px; left: -101px;">点点 - 博客从此简单</h1>
        <div id="login-wrap">
            <form method="post" action="" class="clearfix" id="login-form">
                <div id="input-login-email" class="input-wrap">
                    <span class="input-icon"></span>
                    <label>邮箱</label>
                    <input type="text" value="" name="email" class="input-text" value="{%$the_email%}">
                    <div {%if !$errors.email%}style="display:none;"{%/if%} class="tip">{%$errors.email|default:"邮箱格式不正确"%}</div>
                </div>
                <div id="input-login-pwd" class="input-wrap">
                    <span class="input-icon"></span>
                    <label>密码</label>
                    <input type="password" name="password" class="input-text">
                    <div {%if !$errors.pwd%}style="display:none;"{%/if%} class="tip">{%$errors.pwd|default:"密码最少要六位"%}</div>
                </div>
                <input type="hidden" value="" name="nextUrl">
                <input type="hidden" value="" name="lcallback">
                <input type="hidden" checked="checked" value="1" name="persistent">
                <input type="submit" value="登录" class="input-button" id="login-submit">
            </form>
        <div class="clearfix" id="login-help">
            <span id="third-party-login"><a href="{%'account/password/forget'|u%}">忘记密码?</a></span>
        </div>
    </div>
</div>

{%/block%}

{%block extra_jquery%}
    $("input:first").focus();
    {%if $the_email%}
    $("input[name='email']").val('{%$the_email%}');
    {%/if%}
{%/block%}